Text document pages and web pages display content in different languages. Hebrew, Arabic and various other languages are written in right-to-left scripts. It is a common requirement for an application to be localized to one or more of the languages written in these scripts. Applications are also required to be able to display and obtain input text in these languages even when the overall page is localized to a left-to-right language, or vice versa. Furthermore, when displaying or taking as input right-to-left text in an overall page localized to a left-to-right language, or vice versa, the application must explicitly declare the direction of such text, since without such explicit direction declaration, the text may not be displayed correctly These directional requirements are often called bidi support (“bidi” is short for bidirectional). To implement bidi support, an application's pages must use mark-up and/or special formatting characters to declare and control page and text direction.
It can be quite difficult for applications to implement bidi support. In particular, this requires special handling at every point where it displays a data item or allows the user to enter a data item whose direction could potentially be opposite that of the overall page. As a result, an application's bidi support is always in danger of regression, as developers working on a new feature often simply forget to deal with text direction, and thus do not add the required handling in the new feature. Often, applications and pages with bidirectional text present such content with errors.